/**
 * 
 */
package com.photoinfo.app.vo;

import java.io.Serializable;

/**
 * Base class for the used Equipment of a taken picture
 * 
 * @author Holz, Roberto
 * 
 *         created 20.04.2008 | 00:37:15
 */
public abstract class Equipment implements Serializable {

	private static final long serialVersionUID = 1231312334536463L;

	protected String make;

	protected String model;

	public Equipment(String make, String model) {
		this.make = make;
		this.model = model;
	}

	public String getMake() {
		return make;
	}

	public void setMake(String make) {
		this.make = make;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	@Override
	public String toString() {
		StringBuilder builder = new StringBuilder();

		if (make != null)
			builder.append(make).append(" ");

		builder.append(model).toString();

		return builder.toString();

	}

	@Override
	public boolean equals(Object obj) {
		Equipment object = (Equipment) obj;
		if (make.equalsIgnoreCase(object.getMake())
				&& model.equalsIgnoreCase(object.getModel()))
			return true;
		return false;
	}
}
